package com.quectel.core.module.application.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.quectel.core.module.application.entity.ApplicationEntity;

import java.util.List;
import java.util.Map;

/**
 * @author rananxin
 * @date 2021-11-02 10:59:32
 */

public interface ApplicationDao extends BaseMapper<ApplicationEntity> {

    List<ApplicationEntity> fetchByConfCode(String confCode, int shardingTotalCount, int shardingItem);

    /**
     * 分片取出有定时任务的应用
     *
     * @param shardingTotalCount
     * @param shardingItem
     * @return
     */
    List<ApplicationEntity> fetchNeedTaskDataBySharding(int shardingTotalCount, int shardingItem);

    /**
     * 查询列表
     *
     * @param params
     * @return
     */
    List<ApplicationEntity> queryList(Map<String, Object> params);

    /**
     * 查询数量
     *
     * @param params
     * @return
     */
    int queryTotal(Map<String, Object> params);


}
